﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers.world {
    import net.wooga.pets.events.*;
    import net.wooga.pets.interfaces.*;
    import org.robotlegs.mvcs.*;
    import net.wooga.pets.models.world.*;

    public class AddActionToAvatar extends Command {

        public var event:InfoEvent;
        public var worldModel:WorldModel;

        override public function execute():void{
            var _local1:IAvatar = this.worldModel.avatar;
            _local1.addAction(this.event.id, InfoEvent(this.event.info));
            _local1.moveToRoom(this.event.id);
            if (!_local1.currentAction){
                _local1.handleNextAction();
            };
        }

    }
}//package net.wooga.pets.controllers.world 
